#ifndef __ANO_PROTOCOL_H
#define __ANO_PROTOCOL_H


#include "anodata.h"
#include "led.h"
#include "uart4.h"


#define BYTE0(dwTemp)        (*((char *)(&dwTemp)    ))
#define BYTE1(dwTemp)        (*((char *)(&dwTemp) + 1))
#define BYTE2(dwTemp)        (*((char *)(&dwTemp) + 2))
#define BYTE3(dwTemp)        (*((char *)(&dwTemp) + 3))

void send_acc_gyro(const s16 acc_x, const s16 acc_y, const s16 acc_z, const s16 gyr_x, const s16 gyr_y, const s16 gyr_z, const uint8_t shock_sta);
void send_mag_alt(const s16 mag_x, const s16 mag_y, const s16 mag_z, const s32 alt_bar, const s16 tmp, const u8 bar_sta, const u8 mag_sta);
void send_state_euler_angles(const s16 _roll, const s16 _pitch, const s16 _yaw, const u8 fusion_sta);
void send_four_elements(const s16 v0, const s16 v1, const s16 v2, const s16 v3, const u8 fusion_sta);
void send_depth(int32_t alt_fu,const int16_t alt_add,const int16_t alt_sta);
void send_motors_PWM(void);
void send_rocker_data(const s16 roll, const s16 pitch, const s16 thrust, const s16 yaw, const s16 aux1, const s16 aux2, const s16 aux3, const s16 aux4, const s16 aux5, const s16 aux6);
void send_one_param(const u8 _id, const s32 _val);
void send_param_usart4(const u16 _id, const s32 _val);
void send_check(const u8 _id, const u8 _sc);
void AnoSendF1(const s16 data);
void test_send_param(void);
void cycle_send(const u8 Wait_Id, const s32 Wait_Val, const u8 times);

void send_angle_offset_data(void);
void send_bottom_motors_PWM(void);





#endif

